<%-- 
    Document   : index
    Created on : May 13, 2012, 09:40:48 AM
    Author     : Administrator
--%>


<%@page import="com.alluringdecors.common.Role"%>
<%@page import="com.alluringdecors.ejb.dto.ServicesOfferedDTO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%
    ServicesOfferedDTO dto = (ServicesOfferedDTO) request.getAttribute("ServicesOfferedDTO");
%>

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Maximus4T by 4Templates</title>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <!-- LINKS -->
        <link href="http://fonts.googleapis.com/css?family=Oswald:400,700" rel="stylesheet" type="text/css" />
        <link href="contents/default.css" rel="stylesheet" type="text/css" media="all" />
        <!-- SCRIPTS -->
        <script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="scripts/jquery.dropotron-1.0.js"></script>
        <script type="text/javascript" src="scripts/init.js"></script>   
    </head>
    <body>
        <!-- START HEADER & MENU -->
        <%@include file="../templates/UC_Header.jsp" %>
        <!-- END HEADER & MENU -->

        <!-- START MAIN CONTENT -->
        <div id="main-content">
            <div id="content-table-inner">
                <div id="table-content">
                    <h2><%= dto.getName()%></h2>
                    <!-- start id-form -->
                    <form action="./AddToCart" method="post">
                        <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
                            <tr>
                                <th valign="top">ID:</th>
                                <td><%= dto.getID()%></td>
                                <td></td>
                            </tr>
                            <tr>
                                <th valign="top">Domain:</th>
                                <td><%= dto.getDomainList().getName()%></td>
                                <td></td>
                            </tr>
                            <tr>
                                <th valign="top">Price</th>
                                <td>
                                    <%= dto.getPrice()%>
                                </td>
                                <td></td>
                            </tr>
                            <tr>
                                <th valign="top">Image</th>
                                <td><img src="images/uploads/<%= dto.getImage()%>" border="0" style="width: 200px; height: 200px;" /></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td colspan="2"><h2>Service Offered Description</h2></td>
                            </tr>
                            <tr>
                                <th valign="top">Description</th>
                                <td>
                                    <%= dto.getDescription()%>
                                </td>
                                <td></td>
                            </tr>
                            <tr>
                                <th valign="top">Brief Description</th>
                                <td>
                                    <%= dto.getBriefDescription()%>
                                </td>
                                <td></td>
                            </tr>
                            <tr>
                                <td colspan="2" style="height: 10px;">

                                </td>
                            </tr>
                            <%
                                // Only show this button if user is not administrator
                                UserDTO customer = ((UserDTO) session.getAttribute("UserInfo"));
                                if (customer != null && !Role.ADMINISTRATOR.toString().equals(customer.getRole())) {
                            %>
                            <tr>
                                <th>&nbsp;</th>
                                <td valign="top">
                                    <input type="hidden" name="idserviceoffred2" value="<%= dto.getID()%>" />
                                    <input type="submit" value="" class="form-addtocart" />
                                </td>
                                <td></td>
                            </tr>
                            <% }%>
                        </table>
                    </form>
                    <!-- end id-form  -->
                </div>
            </div>
        </div>
        <!-- END MAIN CONTENT -->   

        <!-- START FOOTER -->
        <div id="footer">
            <%@include file="../templates/UC_Footer.jsp" %>
        </div>
        <!-- END FOOTER -->
    </body>
</html>
